Change History (8)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Keywords: | history added |
---|---|
Milestone: | → PostGIS 2.2.0 |
Owner: | changed from | to
Status: | new → assigned |
Type: | defect → enhancement |
Version: | 2.1.x → trunk |
comment:3 by , 10 years ago
Component: | postgis → raster |
---|
comment:6 by , 10 years ago
strk and dustymugs,
Why is the raster mem size so different from pg_column_size. Might be a bug in pg_column_size or we changed something recently in how we are storing things. For example:
SELECT ST_MemSize(ST_AsRaster(ST_Buffer(ST_Point(1,5),10,1000),150, 150, '8BUI')) As mem_rast_size, pg_column_size(ST_MemSize(ST_AsRaster(ST_Buffer(ST_Point(1,5),10,1000),150, 150, '8BUI'))) As col_rast_size , ST_MemSize(ST_Buffer(ST_Point(1,5),10,1000)) As mem_geom_size, pg_column_size(ST_Buffer(ST_Point(1,5),10,1000)) As col_geom_size;
outputs:
mem_rast_size | col_rast_size | mem_geom_size | col_geom_size
22568 | 4 | 64072 | 64072
I checked the manual and it does say http://www.postgresql.org/docs/current/static/functions-admin.html
as I remember pg_column_size — Number of bytes used to store a particular value (possibly compressed)
is compression for this case really that good. I guess its possible since it is a fairly simple rasterized geometry.
I did a quick test on one of my production PostGIS 2.1.2 installs and:
SELECT pg_column_size(ST_AsRaster(ST_Buffer(ST_Point(1,5),10,1000),150, 150, '8BUI'));
Yields:
22568
So unless we changed something recently in how we are storing something seems a bit fishy.
comment:7 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
update docs at r12534. I'm going to close this out and open up the pg_column_size discrepancy as a separate ticket which dustymugs can swiftly close if he feels this is an expected change.
comment:8 by , 10 years ago
nevermind my diatribe, I just realized I had a typo in my example and pg_column_size and ST_MemSize do return the same answer for raster. I had a typo pg_column_size(ST_MemSize…) doh.
Committed as r12630 — but I hadn't added documentation. Can you help with that robe ? I'd just point it to the geometry version…